POV-Ray : Newsgroups : povray.programming : Why there are no mesh creation functions? : Why there are no mesh creation functions? Server Time
28 Jul 2024 14:17:53 EDT (-0400)
  Why there are no mesh creation functions?  
From: Warp
Date: 8 Dec 2000 08:59:06
Message: <3a30e92a@news.povray.org>
<whine>

  Studying mesh.h, Parse_Mesh() and Parse_Mesh2() it's clear that there
are almost no functions available to help creating a triangle mesh.
  The only functions are related to the hash table and bounding box tree.

  If someone wants to create a new object which internally generates a
triangle mesh, he has to do almost everything that Parse_Mesh() does
(eg. a dynamic array etc).

  Shouldn't mesh.h contain mesh creation functions? Something very simple,
like eg. StartCreatingMesh(...), AddTriangle(...), AddSmoothTriangle(...),
DoneCreatingMesh(...) or whatever.
  It's very tedious to have to code again most of the Parse_Mesh() code.
And that's not very modular either.

  I'm making a test object which creates a triangle mesh, but I'm really
discouraged due to the amount of work it apparently needs...

</whine>


<extrawhine>

  Why parse.c is so long?
  11970 lines of code in one C-file is just a bit too much. Trying to find
something there is like trying to find a needle in a haystack.

  I thought that the POV-Ray source code was well-done and very modular,
but it seems that I was mistaken.
  Now I really understand the need for a complete rewrite. Studying the code
makes the reason very clear.

  Well, it has happened to me several times, so I understand that it can
happen.
  I make a very small program. Then I expand it over the time until it's about
100 times larger than the very first version. At that time the code is so
messed up that it's practically unreadable and unchangeable.
  It happened to me with me mesh compressor (that's why I rewrote it
completely).

</extrawhine>

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.